Integrand size = 21, antiderivative size = 295 \[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {b^{2/3} \arctan \left (\frac {\sqrt [3]{b}-2 \sqrt [3]{a} \cos (e+f x)}{\sqrt {3} \sqrt [3]{b}}\right )}{\sqrt {3} \sqrt [3]{a} \left (a^{4/3}+a^{2/3} b^{2/3}+b^{4/3}\right ) f}+\frac {\log (1-\cos (e+f x))}{2 (a+b) f}+\frac {\log (1+\cos (e+f x))}{2 (a-b) f}-\frac {\left (a^{2/3}+b^{2/3}\right ) b^{2/3} \log \left (\sqrt [3]{b}+\sqrt [3]{a} \cos (e+f x)\right )}{3 \sqrt [3]{a} \left (a^2-b^2\right ) f}+\frac {\left (a^{2/3}+b^{2/3}\right ) b^{2/3} \log \left (b^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cos (e+f x)+a^{2/3} \cos ^2(e+f x)\right )}{6 \sqrt [3]{a} \left (a^2-b^2\right ) f}-\frac {b^2 \log \left (b+a \cos ^3(e+f x)\right )}{3 a \left (a^2-b^2\right ) f} \]
1/2*ln(1-cos(f*x+e))/(a+b)/f+1/2*ln(1+cos(f*x+e))/(a-b)/f-1/3*(a^(2/3)+b^( 2/3))*b^(2/3)*ln(b^(1/3)+a^(1/3)*cos(f*x+e))/a^(1/3)/(a^2-b^2)/f+1/6*(a^(2 /3)+b^(2/3))*b^(2/3)*ln(b^(2/3)-a^(1/3)*b^(1/3)*cos(f*x+e)+a^(2/3)*cos(f*x +e)^2)/a^(1/3)/(a^2-b^2)/f-1/3*b^2*ln(b+a*cos(f*x+e)^3)/a/(a^2-b^2)/f-1/3* b^(2/3)*arctan(1/3*(b^(1/3)-2*a^(1/3)*cos(f*x+e))/b^(1/3)*3^(1/2))/a^(1/3) /(a^(4/3)+a^(2/3)*b^(2/3)+b^(4/3))/f*3^(1/2)
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.69 (sec) , antiderivative size = 215, normalized size of antiderivative = 0.73 \[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{(a-b) f}+\frac {\log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{(a+b) f}+\frac {b \left (3 b \log \left (\sec ^2\left (\frac {1}{2} (e+f x)\right )\right )+(-a+b) \text {RootSum}\left [-8 a+12 a \text {$\#$1}-6 a \text {$\#$1}^2+a \text {$\#$1}^3-b \text {$\#$1}^3\&,\frac {-4 a \log \left (1-\text {$\#$1}+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 a \log \left (1-\text {$\#$1}+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \text {$\#$1}+b \log \left (1-\text {$\#$1}+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \text {$\#$1}^2}{4 a-4 a \text {$\#$1}+a \text {$\#$1}^2-b \text {$\#$1}^2}\&\right ]\right )}{3 \left (a^3-a b^2\right ) f} \]
Log[Cos[(e + f*x)/2]]/((a - b)*f) + Log[Sin[(e + f*x)/2]]/((a + b)*f) + (b *(3*b*Log[Sec[(e + f*x)/2]^2] + (-a + b)*RootSum[-8*a + 12*a*#1 - 6*a*#1^2 + a*#1^3 - b*#1^3 & , (-4*a*Log[1 - #1 + Tan[(e + f*x)/2]^2] + 2*a*Log[1 - #1 + Tan[(e + f*x)/2]^2]*#1 + b*Log[1 - #1 + Tan[(e + f*x)/2]^2]*#1^2)/( 4*a - 4*a*#1 + a*#1^2 - b*#1^2) & ]))/(3*(a^3 - a*b^2)*f)
Time = 0.67 (sec) , antiderivative size = 281, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4626, 7276, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (e+f x) \left (a+b \sec (e+f x)^3\right )}dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \frac {\cos ^4(e+f x)}{\left (1-\cos ^2(e+f x)\right ) \left (a \cos ^3(e+f x)+b\right )}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 7276 |
\(\displaystyle -\frac {\int \left (-\frac {b \left (b \cos ^2(e+f x)-a \cos (e+f x)+b\right )}{\left (b^2-a^2\right ) \left (a \cos ^3(e+f x)+b\right )}-\frac {1}{2 (a+b) (\cos (e+f x)-1)}-\frac {1}{2 (a-b) (\cos (e+f x)+1)}\right )d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {b^{2/3} \arctan \left (\frac {\sqrt [3]{b}-2 \sqrt [3]{a} \cos (e+f x)}{\sqrt {3} \sqrt [3]{b}}\right )}{\sqrt {3} \sqrt [3]{a} \left (a^{2/3} b^{2/3}+a^{4/3}+b^{4/3}\right )}+\frac {b^2 \log \left (a \cos ^3(e+f x)+b\right )}{3 a \left (a^2-b^2\right )}-\frac {b^{2/3} \left (a^{2/3}+b^{2/3}\right ) \log \left (a^{2/3} \cos ^2(e+f x)-\sqrt [3]{a} \sqrt [3]{b} \cos (e+f x)+b^{2/3}\right )}{6 \sqrt [3]{a} \left (a^2-b^2\right )}+\frac {b^{2/3} \left (a^{2/3}+b^{2/3}\right ) \log \left (\sqrt [3]{a} \cos (e+f x)+\sqrt [3]{b}\right )}{3 \sqrt [3]{a} \left (a^2-b^2\right )}-\frac {\log (1-\cos (e+f x))}{2 (a+b)}-\frac {\log (\cos (e+f x)+1)}{2 (a-b)}}{f}\) |
-(((b^(2/3)*ArcTan[(b^(1/3) - 2*a^(1/3)*Cos[e + f*x])/(Sqrt[3]*b^(1/3))])/ (Sqrt[3]*a^(1/3)*(a^(4/3) + a^(2/3)*b^(2/3) + b^(4/3))) - Log[1 - Cos[e + f*x]]/(2*(a + b)) - Log[1 + Cos[e + f*x]]/(2*(a - b)) + ((a^(2/3) + b^(2/3 ))*b^(2/3)*Log[b^(1/3) + a^(1/3)*Cos[e + f*x]])/(3*a^(1/3)*(a^2 - b^2)) - ((a^(2/3) + b^(2/3))*b^(2/3)*Log[b^(2/3) - a^(1/3)*b^(1/3)*Cos[e + f*x] + a^(2/3)*Cos[e + f*x]^2])/(6*a^(1/3)*(a^2 - b^2)) + (b^2*Log[b + a*Cos[e + f*x]^3])/(3*a*(a^2 - b^2)))/f)
3.5.60.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionE xpand[u/(a + b*x^n), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ [n, 0]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 3.43 (sec) , antiderivative size = 288, normalized size of antiderivative = 0.98
method | result | size |
risch | \(\frac {i x}{a}-\frac {i x}{a +b}-\frac {i e}{f \left (a +b \right )}-\frac {i x}{a -b}-\frac {i e}{f \left (a -b \right )}-\frac {2 i a^{2} b^{2} f^{3} x}{-a^{5} f^{3}+a^{3} b^{2} f^{3}}-\frac {2 i a^{2} b^{2} f^{2} e}{-a^{5} f^{3}+a^{3} b^{2} f^{3}}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f \left (a +b \right )}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f \left (a -b \right )}+i \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (27 a^{5} f^{3}-27 a^{3} b^{2} f^{3}\right ) \textit {\_Z}^{3}-27 i b^{2} a^{2} f^{2} \textit {\_Z}^{2}+9 \textit {\_Z} a \,b^{2} f +i b^{2}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\left (\left (-\frac {18 a^{3} f^{2}}{b}+18 a b \,f^{2}\right ) \textit {\_R}^{2}+18 i b f \textit {\_R} -\frac {4 b}{a}\right ) {\mathrm e}^{i \left (f x +e \right )}+1\right )\right )\) | \(288\) |
derivativedivides | \(\frac {\frac {\ln \left (1+\cos \left (f x +e \right )\right )}{2 a -2 b}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right )}{2 a +2 b}+\frac {\left (-b \left (\frac {\ln \left (\cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {1}{3}}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {2}{3}}}-\frac {\ln \left (\cos \left (f x +e \right )^{2}-\left (\frac {b}{a}\right )^{\frac {1}{3}} \cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {2}{3}}\right )}{6 a \left (\frac {b}{a}\right )^{\frac {2}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 \cos \left (f x +e \right )}{\left (\frac {b}{a}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {2}{3}}}\right )+a \left (-\frac {\ln \left (\cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {1}{3}}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {1}{3}}}+\frac {\ln \left (\cos \left (f x +e \right )^{2}-\left (\frac {b}{a}\right )^{\frac {1}{3}} \cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {2}{3}}\right )}{6 a \left (\frac {b}{a}\right )^{\frac {1}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 \cos \left (f x +e \right )}{\left (\frac {b}{a}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {1}{3}}}\right )-\frac {b \ln \left (b +a \cos \left (f x +e \right )^{3}\right )}{3 a}\right ) b}{\left (a +b \right ) \left (a -b \right )}}{f}\) | \(303\) |
default | \(\frac {\frac {\ln \left (1+\cos \left (f x +e \right )\right )}{2 a -2 b}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right )}{2 a +2 b}+\frac {\left (-b \left (\frac {\ln \left (\cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {1}{3}}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {2}{3}}}-\frac {\ln \left (\cos \left (f x +e \right )^{2}-\left (\frac {b}{a}\right )^{\frac {1}{3}} \cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {2}{3}}\right )}{6 a \left (\frac {b}{a}\right )^{\frac {2}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 \cos \left (f x +e \right )}{\left (\frac {b}{a}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {2}{3}}}\right )+a \left (-\frac {\ln \left (\cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {1}{3}}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {1}{3}}}+\frac {\ln \left (\cos \left (f x +e \right )^{2}-\left (\frac {b}{a}\right )^{\frac {1}{3}} \cos \left (f x +e \right )+\left (\frac {b}{a}\right )^{\frac {2}{3}}\right )}{6 a \left (\frac {b}{a}\right )^{\frac {1}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 \cos \left (f x +e \right )}{\left (\frac {b}{a}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 a \left (\frac {b}{a}\right )^{\frac {1}{3}}}\right )-\frac {b \ln \left (b +a \cos \left (f x +e \right )^{3}\right )}{3 a}\right ) b}{\left (a +b \right ) \left (a -b \right )}}{f}\) | \(303\) |
I*x/a-I/(a+b)*x-I/f/(a+b)*e-I/(a-b)*x-I/f/(a-b)*e-2*I*a^2*b^2*f^3/(-a^5*f^ 3+a^3*b^2*f^3)*x-2*I*a^2*b^2*f^2/(-a^5*f^3+a^3*b^2*f^3)*e+1/f/(a+b)*ln(exp (I*(f*x+e))-1)+1/f/(a-b)*ln(exp(I*(f*x+e))+1)+I*sum(_R*ln(exp(2*I*(f*x+e)) +((-18*a^3/b*f^2+18*a*b*f^2)*_R^2+18*I*b*f*_R-4*b/a)*exp(I*(f*x+e))+1),_R= RootOf((27*a^5*f^3-27*a^3*b^2*f^3)*_Z^3-27*I*b^2*a^2*f^2*_Z^2+9*_Z*a*b^2*f +I*b^2))
Result contains complex when optimal does not.
Time = 1.06 (sec) , antiderivative size = 6482, normalized size of antiderivative = 21.97 \[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\text {Too large to display} \]
\[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\int \frac {\cot {\left (e + f x \right )}}{a + b \sec ^{3}{\left (e + f x \right )}}\, dx \]
Time = 0.30 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.04 \[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {\frac {2 \, \sqrt {3} {\left (a b^{2} {\left (3 \, \left (\frac {b}{a}\right )^{\frac {1}{3}} + \frac {2 \, b}{a}\right )} - 3 \, a^{2} b \left (\frac {b}{a}\right )^{\frac {2}{3}} - 2 \, b^{3}\right )} \arctan \left (-\frac {\sqrt {3} {\left (\left (\frac {b}{a}\right )^{\frac {1}{3}} - 2 \, \cos \left (f x + e\right )\right )}}{3 \, \left (\frac {b}{a}\right )^{\frac {1}{3}}}\right )}{{\left (a^{4} \left (\frac {b}{a}\right )^{\frac {2}{3}} - a^{2} b^{2} \left (\frac {b}{a}\right )^{\frac {2}{3}}\right )} \left (\frac {b}{a}\right )^{\frac {1}{3}}} + \frac {3 \, {\left (b^{2} {\left (2 \, \left (\frac {b}{a}\right )^{\frac {2}{3}} - 1\right )} - a b \left (\frac {b}{a}\right )^{\frac {1}{3}}\right )} \log \left (\cos \left (f x + e\right )^{2} - \left (\frac {b}{a}\right )^{\frac {1}{3}} \cos \left (f x + e\right ) + \left (\frac {b}{a}\right )^{\frac {2}{3}}\right )}{a^{3} \left (\frac {b}{a}\right )^{\frac {2}{3}} - a b^{2} \left (\frac {b}{a}\right )^{\frac {2}{3}}} + \frac {6 \, {\left (b^{2} {\left (\left (\frac {b}{a}\right )^{\frac {2}{3}} + 1\right )} + a b \left (\frac {b}{a}\right )^{\frac {1}{3}}\right )} \log \left (\left (\frac {b}{a}\right )^{\frac {1}{3}} + \cos \left (f x + e\right )\right )}{a^{3} \left (\frac {b}{a}\right )^{\frac {2}{3}} - a b^{2} \left (\frac {b}{a}\right )^{\frac {2}{3}}} - \frac {9 \, \log \left (\cos \left (f x + e\right ) + 1\right )}{a - b} - \frac {9 \, \log \left (\cos \left (f x + e\right ) - 1\right )}{a + b}}{18 \, f} \]
-1/18*(2*sqrt(3)*(a*b^2*(3*(b/a)^(1/3) + 2*b/a) - 3*a^2*b*(b/a)^(2/3) - 2* b^3)*arctan(-1/3*sqrt(3)*((b/a)^(1/3) - 2*cos(f*x + e))/(b/a)^(1/3))/((a^4 *(b/a)^(2/3) - a^2*b^2*(b/a)^(2/3))*(b/a)^(1/3)) + 3*(b^2*(2*(b/a)^(2/3) - 1) - a*b*(b/a)^(1/3))*log(cos(f*x + e)^2 - (b/a)^(1/3)*cos(f*x + e) + (b/ a)^(2/3))/(a^3*(b/a)^(2/3) - a*b^2*(b/a)^(2/3)) + 6*(b^2*((b/a)^(2/3) + 1) + a*b*(b/a)^(1/3))*log((b/a)^(1/3) + cos(f*x + e))/(a^3*(b/a)^(2/3) - a*b ^2*(b/a)^(2/3)) - 9*log(cos(f*x + e) + 1)/(a - b) - 9*log(cos(f*x + e) - 1 )/(a + b))/f
\[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\int { \frac {\cot \left (f x + e\right )}{b \sec \left (f x + e\right )^{3} + a} \,d x } \]
Time = 23.78 (sec) , antiderivative size = 11182, normalized size of antiderivative = 37.91 \[ \int \frac {\cot (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\text {Too large to display} \]
log(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2))/(f*(a + b)) - log(1/cos(e/2 + ( f*x)/2)^2)/(f*(a + b)) + (a*symsum(log((262144*(832*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)*b^7 - 22*a*b^5 - 840* b^6*cos(e + f*x) + 440*b^6 - 264*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2 *b^2*z^2 + 9*a*b^2*z - b^2, z, k)^2*b^8 + 16*root(27*a^3*b^2*z^3 - 27*a^5* z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)^3*b^9 + 1823*root(27*a^3*b^2 *z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)*a^2*b^5 - 21*r oot(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)* a^3*b^4 - 8864*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2 *z - b^2, z, k)^2*a*b^7 + 3092*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2*b ^2*z^2 + 9*a*b^2*z - b^2, z, k)^3*a*b^8 - 192*root(27*a^3*b^2*z^3 - 27*a^5 *z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)^4*a*b^9 + 88*root(27*a^3*b^ 2*z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)^2*b^8*cos(e + f*x) - a^2*b^4*cos(e + f*x) + 65221*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27 *a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)^2*a^2*b^6 - 32708*root(27*a^3*b^2*z^ 3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)^2*a^3*b^5 + 2859* root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2*z - b^2, z, k) ^2*a^4*b^4 - 9*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^2*b^2*z^2 + 9*a*b^2 *z - b^2, z, k)^2*a^5*b^3 + 26274*root(27*a^3*b^2*z^3 - 27*a^5*z^3 - 27*a^ 2*b^2*z^2 + 9*a*b^2*z - b^2, z, k)^3*a^2*b^7 - 212230*root(27*a^3*b^2*z...